package com.alibaba.citrus.cr.price.ability.functions.entity.activity;

import java.util.Map;

/**
 * @author: myw
 * @create: 2022/08/31
 * @Description 自定义主子单存储是否禁止选用此活动
 */
public class ActivityLineNeedChooseThreadLocal {
    private static ThreadLocal<Map<String,Boolean>> threadLocal = new ThreadLocal<>();

    /**
     * 获取 Map<String, Map<String,Boolean>>
     *
     * @return Map<String, Map<String,Boolean>>
     */
//    Map<String, Map<String,Boolean>> activityMainLineChooseMap=new HashMap<>();
    public static Map<String,Boolean> get() {
        return threadLocal.get();
    }

    /**
     * 清空 Map<String, Map<String,Boolean>>
     */
    public static void clear() {
        threadLocal.remove();
    }

    public static void set(Map<String,Boolean> chooseFlag){
        threadLocal.set(chooseFlag);
    }


}
